namespace Live2D.Cubism.Core.Unmanaged
{
	public unsafe class ListIntUnsafe
	{
		private int mCount;//
		private int* mItemsP;                      //
		public readonly int[] Items;     //

		public ListIntUnsafe(int capacity)
		{
			Items = new int[capacity];
			mCount = 0;
		}
		public bool HasItem
		{
			get { return mCount > 0; }
		}

		public void SetPoint(int* pointer)
		{
			mItemsP = pointer;
		}
		public void AddUnsafe(int item)
		{
			mItemsP[mCount] = item;
			mCount++;
		}
		public void Add(int item)
		{
			Items[mCount] = item;
			mCount++;
		}
		public void Clear()
		{
			mCount = 0;
		}
		public int Count
		{
			get { return mCount; }
		}
	}
}